﻿using System.Data.Entity.Core.Objects;
using GC_RF.DataAccess.Abstractions.Interfaces.Factories;

namespace GC_RF.DataAccess.Factories
{
	public class DbContextFactory : IDbContextFactory
	{
		#region Variables

		private readonly ObjectContext _context;

		#endregion

		#region Constructors

		public DbContextFactory()
		{
			_context = new ObjectContext("name=RealFootball");
			_context.ContextOptions.LazyLoadingEnabled = true;
			_context.CommandTimeout = 600;
		}

		#endregion

		#region IDbContextFactory Members

		public ObjectContext GetContext()
		{
			return _context;
		}

		#endregion
	}
}
